package com.webchat.rmi.pgc.mall;


import com.webchat.common.bean.APIPageResponseBean;
import com.webchat.common.bean.APIResponseBean;
import com.webchat.domain.vo.request.mall.ShopReviewRequestVO;
import com.webchat.domain.vo.request.mall.ShopSubmitRequestVO;
import com.webchat.domain.vo.response.mall.MallShopReviewResponseVO;
import com.webchat.rmi.interceptor.RpcRequestInterceptor;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "webchat-pgc-service",
        contextId = "mallShopReviewClient",
        configuration = RpcRequestInterceptor.class)
public interface MallShopReviewClient {


    /**
     * 店铺审核工单列表
     *
     * @param shopName
     * @param reviewStatus
     * @param pageNo
     * @param pageSize
     * @return
     */
    @GetMapping("/pgc-service/mall/review/shop/page")
    APIPageResponseBean<MallShopReviewResponseVO> page(
            @RequestParam(value = "shopName", required = false) String shopName,
            @RequestParam(value = "reviewStatus", required = false) Integer reviewStatus,
            @RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNo,
            @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize);


    /**
     * 店铺审核
     *
     * @param shopReviewRequestVO
     * @return
     */
    @PostMapping("/pgc-service/mall/review/shop/review")
    APIResponseBean<Boolean> review(@RequestBody ShopReviewRequestVO shopReviewRequestVO);
}
